feat: GetExceptionsByReportDate #1495
Conversation
…yReportDate logic, added GetQueryParameterAsDateTime in helper class,
…om/NHSDigital/dtos-cohort-manager into feat/DTOSS-10556-Exception-Reports
…category and date correctly
|
@chrimesdev queryParams are in the description, i've done some DEV testing with it, and all unit tests are passing |
There was a problem hiding this comment.
Pull Request Overview
This PR adds report-based filtering functionality for validation exceptions by implementing the GetExceptionsByReportDate method. The feature allows filtering exceptions by specific date ranges and categories (Confusion/Superseded).
- Added
GetReportExceptionsmethod to filter validation exceptions by date and categories 12 (Confusion) and 13 (Superseded) - Implemented
GetQueryParameterAsDateTimehelper method with support for multiple date formats - Added comprehensive test coverage for various filtering scenarios
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ValidationExceptionDataTests.cs | Added test data and comprehensive test methods for report exception filtering scenarios |
| GetValidationExceptions.cs | Enhanced function to handle report requests with date/category filtering and improved documentation |
| ValidationExceptionData.cs | Implemented GetReportExceptions method with filtering logic for categories 12/13 and date ranges |
| IValidationExceptionData.cs | Added interface method for GetReportExceptions |
| PaginationService.cs | Refactored default ID selector with null-coalescing operators |
| IHttpParserHelper.cs | Added interface method for DateTime parameter parsing |
| HttpParserHelper.cs | Implemented GetQueryParameterAsDateTime with multiple format support and error logging |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Looking good, in the response is it possible to return the |
- Move date filtering to database query to reduce memory usage - Throw exception for null ID values instead of defaulting to 0
…eportExceptions refactor for details
…om/NHSDigital/dtos-cohort-manager into feat/DTOSS-10556-Exception-Reports
|
Exception Details object has been added |
* feat: added ReportDate Query Param, updated XML, added GetExceptionsByReportDate logic, added GetQueryParameterAsDateTime in helper class, * test: GetExceptionsByReportDate Tests * feat: format provider added to helper method * chore: sonarQube warnings and default value * feat: isReport added, GetReportExceptions logic changed to filter by category and date correctly * fix: default value already applied to helper method, removed * test: tests added * chore: renamed variable * feat: abstract logic * chore: XML docs * chore: ternary operator formatting * fix: logic error in GetReportExceptions * fix: date fix * fix: category logic fix * refactor: refactor and tidy up GetReportExceptions method * test: updated tests * fix: improve query performance and null ID handling - Move date filtering to database query to reduce memory usage - Throw exception for null ID values instead of defaulting to 0 * chore: removed unused variable * tests: update tests * chore: tidy null check * chore: removed unused variable * feat: exception Details added, Pagination fixed for non reports, GetReportExceptions refactor for details * test: test date * fix: renamed BuildNavigationHeaders to AddNavigationHeaders



Description
Added reportDate parameter with date validation
GetExceptionsByReportDate method filtering categories 12 (Confusion) and 13 (Superseded)
Added GetQueryParameterAsDateTime
Filter by Category & Date

Filter by Category

Filter by Date

All category 12 & 13 records
Context
https://nhsd-jira.digital.nhs.uk/browse/DTOSS-10556
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.